package cn.com.chengmandian.bike.service.impl;

import cn.com.chengmandian.bike.model.EbPriceStep;
import cn.com.chengmandian.bike.mapper.EbPriceStepMapper;
import cn.com.chengmandian.bike.service.IEbPriceStepService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 电单车运营-价格标准-阶梯定价 服务实现类
 * </p>
 *
 * @author AutoGenerator
 * @since 2024-08-05
 */
@Service
public class EbPriceStepServiceImpl extends ServiceImpl<EbPriceStepMapper, EbPriceStep> implements IEbPriceStepService {

    @Override
    public List<EbPriceStep> getAreaPriceStep(Integer areaId) {
        return this.list(new LambdaQueryWrapper<EbPriceStep>()
                .eq(EbPriceStep::getAreaId, areaId)
                .orderByAsc(EbPriceStep::getMinute));
    }
}
